/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/views/layout/Layout'

const customerRouter = {
  path: '/customer',
  component: Layout,
  redirect: '/customer/menu1/menu1-1',
  name: 'customer',
  meta: {
    title: '客服中心',
    icon: 'auth'
  },
  children: [
    {
      path: 'menu1',
      component: () => import('@/views/customer/menu1/index'), // Parent router-view
      name: 'Menu1',
      meta: { title: '消息反馈', icon: 'auth', noCache: true },
      redirect: '/customer/menu1/menu1-1',
      children: [
        {
          path: 'menu1-1',
          component: () => import('@/views/customer/menu1/menu1-1'),
          name: 'Menu1-1',
          meta: { title: '消息列表', icon: 'auth', noCache: true }
        },
        {
          path: 'menu1-2',
          component: () => import('@/views/customer/menu1/menu1-2'),
          name: 'Menu1-2',
          meta: { title: '消息配置', icon: 'auth', noCache: true }
        },
        {
          path: 'menu1-1-d',
          component: () => import('@/views/customer/menu1/menu1-1-d'),
          name: 'Menu1-1-d',
          meta: { title: '消息详情', icon: 'auth', noCache: true, activeMenu: '/customer/menu1/menu1-1' },
          hidden: true
        },
        {
          path: 'menu1-3',
          component: () => import('@/views/customer/menu1/menu1-3'),
          name: 'Menu1-3',
          meta: { title: '自动回复', icon: 'auth', noCache: true }
        }
      ]
    },
    {
      path: 'menu2',
      name: 'Menu2',
      component: () => import('@/views/customer/menu2/index'),
      meta: { title: '短信通知', icon: 'auth' }
    },
    {
      path: 'menu3',
      name: 'Menu3',
      component: () => import('@/views/customer/menu3/index'),
      meta: { title: '消息群发', icon: 'auth' }
    }
  ]
}

export default customerRouter
